home *** CD-ROM | disk | FTP | other *** search
/ Merciful 2 / Merciful - Disc 2.iso / software / t / typesmithv2.5a.lha / Install-TypeSmith < prev    next >
Text File  |  1994-08-22  |  9KB  |  311 lines

  1. ; Installer Script for TypeSmith
  2. ; 03/22/94  Soft-Logik Publishing Corporation
  3.  
  4. ; set up an error cleanup routine
  5. (onerror
  6.     (makeassign "TSsrc" (safe))
  7.     (makeassign "TSdest" (safe))
  8. )
  9.  
  10. ;just started
  11. (complete 0)
  12.  
  13. ;cancel the assign in case of installation restart
  14. (makeassign "TSsrc" (safe))
  15. (makeassign "TSdest" (safe))
  16.  
  17. ; get the dest dir for TypeSmith (create it if it does not exist)
  18. (set ts_dest
  19.     (tackon
  20.         (askdir
  21.             (prompt "Where should TypeSmith be installed? A drawer named `TypeSmith' will be created there. If you're updating from a previous version, select the directory containing the TypeSmith drawer.")
  22.             (help @askdir-help)
  23.             (default @default-dest)
  24.         )
  25.         "TypeSmith"
  26.     )
  27. )
  28. (makeassign "TSdest"
  29.     (pathonly ts_dest)
  30.     (safe)
  31. )
  32. (if (exists "TSdest:TypeSmith")
  33.     (+ 1 1)
  34.     (makedir
  35.         "TSdest:TypeSmith"
  36.         (infos)
  37.         (safe)
  38.     )
  39. )
  40.  
  41. ;We now have a valid destination, so tell Installer where TS will end up
  42. ;so the exit page will be correct.
  43. (set @default-dest ts_dest)
  44.  
  45. ;lock on to volume 'TypeSmith'
  46. (askdisk
  47.     (prompt "Please put the TypeSmith disk in any drive.")
  48.     (help "\n\n\n\nThis is required to install TypeSmith 2.5.")
  49.     (dest   "TSprogram")
  50.     (newname "TSsrc")
  51. )
  52.  
  53. (complete 10)
  54.  
  55. ;Copy the LHEX program to ram:
  56. (copyfiles
  57.     (source "TSsrc:lhex")
  58.     (dest "ram:")
  59. )
  60. (copyfiles
  61.     (source "TSsrc:ReadMe.Now")
  62.     (dest "TSdest:TypeSmith")
  63.     (infos)
  64. )
  65.  
  66. ;copy program files from source to dest
  67. (if
  68.     (askbool
  69.         (prompt "\n\n\n\n\nDo you want to copy the TypeSmith program?")
  70.         (help "\n\nClicking 'Copy' will copy the TypeSmith program and TSFiles drawer to your system. Clicking 'Do Not Copy' will skip to the next step. If you have already installed the TypeSmith program and TSFiles drawer and just want to install other files, click 'Do Not Copy'.")
  71.         (choices "Copy" "Do Not Copy")
  72.         (default 1)
  73.     )
  74.     (
  75.         (copyfiles
  76.             (source "TSsrc:TypeSmith")
  77.             (dest "TSdest:TypeSmith")
  78.             (infos)
  79.         )
  80.         (complete 35)
  81.         (copyfiles
  82.         (source "TSsrc:TSFiles")
  83.             (dest "TSdest:TypeSmith/TSFiles")
  84.             (all)
  85.         )
  86.     )
  87. )
  88.  
  89. (complete 40)
  90.  
  91. ;copy ARexx files from source to dest
  92. (if
  93.     (askbool
  94.         (prompt "\n\n\n\n\nDo you wish to copy the TypeSmith ARexx macros?")
  95.         (help "\n\nThese files are not required to use TypeSmith. ARexx is a macro scripting language which simplifies repetitive tasks. Sample ARexx macros are included with TypeSmith and will be installed now if you click 'Copy'. To skip this step, click 'Do Not Copy'.")
  96.         (choices "Copy" "Do Not Copy")
  97.         (default 1)
  98.     )
  99.     (
  100.         (working)
  101.         (if (exists "TSdest:TypeSmith/Rexx")
  102.             (+ 1 1)
  103.             (makedir
  104.                 "TSdest:TypeSmith/Rexx"
  105.                 (infos)
  106.                 (safe)
  107.             )
  108.         )
  109.         (run "ram:lhex >NIL: <NIL: -qfw=TSdest:TypeSmith x TSsrc:rexx.lha")
  110.     )
  111. )
  112.  
  113. (complete 45)
  114.  
  115. ;copy help files from source to dest
  116. (if
  117.     (askbool
  118.         (prompt "\n\n\n\n\nDo you wish to copy the TypeSmith Help files?")
  119.         (help "These files are not required to use TypeSmith, but provide online documentation to make TypeSmith easier to learn. The help system uses the AmigaGuide program from Commodore.\n\nThis portion of the installation requires that RexxMast be run or be in Sys:System in order to work.")
  120.         (choices "Copy" "Do Not Copy")
  121.         (default 1)
  122.     )
  123.     (
  124.         (working)
  125.         (if (exists "TSdest:TypeSmith/Help")
  126.             (+ 1 1)
  127.             (makedir
  128.                 "TSdest:TypeSmith/Help"
  129.                 (infos)
  130.                 (safe)
  131.             )
  132.         )
  133.         (run "ram:lhex >NIL: <NIL: -qfw=TSdest:TypeSmith x TSsrc:help.lha")
  134.         (if (< (/ (getversion) 65536) 39)
  135.             (
  136.                 (tooltype
  137.                     (dest "TSdest:TypeSmith/Help/English/TypeSmith.help")
  138.                     (setdefaulttool "AmigaGuide")
  139.                 )
  140.                 (copylib
  141.                     (prompt "TypeSmith requires the amigaguide.library for its Help system.")
  142.                     (source "TSsrc:misc/amigaguide.library")
  143.                     (dest "LIBS:")
  144.                     (confirm)
  145.                     (help @copylib-help)
  146.                 )
  147.                 (copylib
  148.                     (prompt "TypeSmith requires the AmigaGuide program for its Help system.")
  149.                     (source "TSsrc:misc/amigaguide")
  150.                     (dest "SYS:Utilities")
  151.                     (confirm)
  152.                     (infos)
  153.                     (help @copylib-help)
  154.                 )
  155.                 (copylib
  156.                     (prompt "AmigaGuide requires its help file for proper operation.")
  157.                     (source "TSsrc:misc/help.guide")
  158.                     (dest "S:")
  159.                     (confirm)
  160.                     (help @copylib-help)
  161.                 )
  162.                 (if
  163.                     (askbool
  164.                         (prompt "\n\nFor TypeSmith's help system to work properly with AmigaGuide, the help file path must be added to AmigaGuide. If you skip this step, you will not be able to use the help system. Click Help for details.")
  165.                         (help "This will create the following file: EnvArc:AmigaGuide/Path. If you already have a file with this name, skip this step and add the following line to it with a text editor:\n\nTypeSmith:Help/English\n\nReboot your computer after installation is complete before using TypeSmith.")
  166.                         (choices "Continue" "Skip This Step")
  167.                         (default 1)
  168.                     )
  169.                     (
  170.                         (makedir "Envarc:AmigaGuide")
  171.                         (copyfiles
  172.                             (source "TSsrc:misc/path")
  173.                             (dest "Envarc:AmigaGuide")
  174.                         )
  175.                     )
  176.                 )
  177.             )
  178.         )
  179.     )
  180. )
  181.  
  182.  
  183. (complete 60)
  184.  
  185. ;copy font files from source to dest
  186. (if
  187.     (askbool
  188.         (prompt "\n\n\n\n\nDo you wish to copy the demo fonts and composition tables?")
  189.         (help "\n\n\n\nThese files are not required, but are recommended for learning TypeSmith.")
  190.         (choices "Copy" "Do Not Copy")
  191.         (default 1)
  192.     )
  193.     (
  194.         (working)
  195.         (if (exists "TSdest:TypeSmith/TSFonts")
  196.             (+ 1 1)
  197.             (makedir
  198.                 "TSdest:TypeSmith/TSFonts"
  199.                 (infos)
  200.                 (safe)
  201.             )
  202.         )
  203.         (run "ram:lhex >NIL: <NIL: -qfw=TSdest:TypeSmith x TSsrc:demofont.lha")
  204.     )
  205. )
  206.  
  207. (complete 65)
  208.  
  209. ;copy art files from source to dest
  210. (if
  211.     (askbool
  212.         (prompt "\n\n\n\n\nDo you wish to copy the demo IFF ILBM and IFF DR2D files?")
  213.         (help   "\n\n\n\nThese files are not required, but are recommended for learning TypeSmith.")
  214.         (choices "Copy" "Do Not Copy")
  215.         (default 1)
  216.     )
  217.     (
  218.         (working)
  219.         (if (exists "TSdest:TypeSmith/TSArt")
  220.             (+ 1 1)
  221.             (makedir
  222.                 "TSdest:TypeSmith/TSArt"
  223.                 (infos)
  224.                 (safe)
  225.             )
  226.         )
  227.         (run "ram:lhex >NIL: <NIL: -qfw=TSdest:TypeSmith x TSsrc:art.lha")
  228.     )
  229. )
  230.  
  231. (complete 70)
  232.  
  233. ;copy Font Downloader from source to dest
  234. (if
  235.     (askbool
  236.         (prompt "\n\n\n\n\nDo you wish to copy the Font Downloader?")
  237.         (help "\n\n\nThe Font Downloader is a separate program used to download PostScript fonts to a PostScript printer before printing from an application.")
  238.         (choices "Copy" "Do Not Copy")
  239.         (default 1)
  240.     )
  241.     (
  242.         (working)
  243.         (run "ram:lhex >NIL: <NIL: -qfw=TSdest:TypeSmith x TSsrc:download.lha")
  244.     )
  245. )
  246.  
  247. (complete 75)
  248.  
  249. ;copy Convert from source to dest
  250. (if
  251.     (askbool
  252.         (prompt "\n\n\n\n\nDo you wish to copy the ProDraw to IFF DR2D Converter?")
  253.         (help "\n\n\nConvert is a separate program used to convert ProDraw clip files to IFF DR2D format for use with TypeSmith.\n\nClicking 'Copy' will copy the Convert program to your system. Clicking 'Do Not Copy' will skip to the next step.")
  254.         (choices "Copy" "Do Not Copy")
  255.         (default 1)
  256.     )
  257.     (
  258.         (working)
  259.         (run "ram:lhex >NIL: <NIL: -qfw=TSdest:TypeSmith x TSsrc:convert.lha")
  260.     )
  261. )
  262.  
  263. (complete 85)
  264.  
  265. ;copy the iff.library
  266. (copylib
  267.     (prompt "TypeSmith requires the iff.library for handling IFF ILBM files.")
  268.     (source "TSsrc:misc/iff.library")
  269.     (dest "LIBS:")
  270.     (confirm)
  271.     (help @copylib-help)
  272. )
  273.  
  274. (complete 90)
  275.  
  276. ;add the assign for TypeSmith: to user-startup
  277. (set tsassign ("Assign TypeSmith: \"%s\"\n" ts_dest))
  278. (startup
  279.         "TypeSmith"
  280.         (prompt "TypeSmith requires that an AmigaDOS assign be created. The following will be added to your s:user-startup file:\n\n"
  281.             tsassign
  282.             "\nIs it okay to add this now?"
  283.             "\n\nIMPORTANT: REBOOT YOUR COMPUTER BEFORE RUNNING TYPESMITH 2.5 FOR THE FIRST TIME.")
  284.         (help @startup-help)
  285.         (command tsassign)
  286. )
  287.  
  288. (complete 95)
  289.  
  290. ;un-snapshot the TS drawer icon
  291. (tooltype
  292.     (dest ts_dest)
  293.     (noposition)
  294. )
  295.  
  296. ;remove the cached LHARC program
  297. (delete "ram:lhex")
  298.  
  299. ;done with the install
  300. (complete 100)
  301.  
  302. ;cleanup
  303. (makeassign "TSsrc" (safe))
  304. (makeassign "TSdest" (safe))
  305.  
  306. ;display the readme file
  307. (run "run df0:more df0:readme.now" (safe))
  308.  
  309. ;and get out
  310. (exit)
  311.